package com.vates.curso.entities;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.vates.curso.utils.BaseObject;

@Entity
@Table(name = "PHONE")
public class Phone extends BaseObject {

	@Id
	@Column(name = "PHONE_ID", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long phoneId;
	@Column(name = "PHONE_NUMBER")
	private String phoneNumber;
	@Column(name = "PHONE_TYPE")
	private String phoneType;
	@ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
	@JoinColumn(name = "USER_ID")
	private User phoneUser;

	public Phone() {
		super();
	}

	public Phone(Long phoneId, String phoneNumber, String phoneType,
			User phoneUser) {
		super();
		this.phoneId = phoneId;
		this.phoneNumber = phoneNumber;
		this.phoneType = phoneType;
		this.phoneUser = phoneUser;
	}

	public Long getPhoneId() {
		return phoneId;
	}

	public void setPhoneId(Long phoneId) {
		this.phoneId = phoneId;
	}

	public String getPhoneNumber() {
		return phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	public String getPhoneType() {
		return phoneType;
	}

	public void setPhoneType(String phoneType) {
		this.phoneType = phoneType;
	}

	public User getPhoneUser() {
		return phoneUser;
	}

	public void setPhoneUser(User phoneUser) {
		this.phoneUser = phoneUser;
	}

	@Override
	public void equals() {
		// TODO Auto-generated method stub

	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return 0;
	}

}
